Image manipulation for a digital copier which operates on a block basis

ABSTRACT

A digital copier and method of processing images in which the images are manipulated and processed utilizing smaller blocks of the image. By working with smaller blocks, the image processing may begin before an entire image is scanned or before the entire image is loaded into a memory or buffer. Further, when printing, the start of the printing process may begin as soon as a row of the smaller blocks is completed without waiting for the generation of the entire manipulated image. The blocks are preferably an integral multiple of the size of a size of a direct memory access buffer, or alternatively, are of a size which may be divided into the size of the direct memory access buffer an integral number of times or are a multiple of the size of the direct memory access buffer. The image processing functions which may be performed include rotation of the image, flipping the image about an axis parallel to a sub-scan direction, logically combining the images by performing functions such as an AND function or an OR function, or generating an image by repeatedly using all or part of another image.

CROSS-REFERENCES TO RELATED APPLICATIONS

[0001] This application is related to commonly owned co-pending U.S.patent application Ser. No. ______ (Atty. Docket 5244-0086-2X) entitled“Digital Copier with Scalable Architecture,” and Ser. No. ______ (Atty.Docket 5244-0087-2X) entitled “Digital Copier with an Unified Memorywhich Stores Computer Instructions and Image Data,” both of which werefiled concurrently with the present application and are incorporatedherein by reference.

BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention

[0003] The present invention relates to a digital copier ormultiple-function image processing device. The invention is moreparticularly related to the manipulation of images which are scanned,stored, or printed. The invention is still further related to therotation of images, the logical combination of two or more images, andthe formation of an image by repeatedly using a section of an image, allbeing implemented using smaller blocks of the image.

[0004] 2. Discussion of the Background

[0005] Digital copiers are image processing devices which scan an image,store a digital representation of the image in memory, and print thedigital representation of the image. In order to print the digitizedimages at a rate similar to rates produced by conventional analogcopiers which never store a digital representation of the image but useoptical components such as mirrors and lenses to generate an image on aphotoconductive drum or belt, a very large amount of data must be movedat a high rate of speed. The requirement to quickly move such a largeamount of data has pushed the capabilities of current data processingand storage devices to their limits.

[0006] Digital copiers may have a need to manipulate image data whichhas been scanned, is stored, or to be printed. A conventional manner ofaccomplishing this function is to load the image into memory which is tobe processed, and then to process this image. However, the inventors ofthis application have noticed that time may be wasted by waiting for theentire image to be loaded into memory. Further, the image processingfunctions may be the weakness of the digital copier which restricts thenumber of copies which the digital copier can produce over a given timeperiod.

SUMMARY OF THE INVENTION

[0007] Accordingly, it is an object of the invention to provide a systemwith increased speed of image manipulation.

[0008] It is another object to the invention to provide a digital copierand method which manipulates images by processing smaller blocks of theimage.

[0009] It is a further object to the invention to provide a digitalcopier and image processing method and system which begins the processof manipulating the image without the need for the entire image to bestored in a buffer.

[0010] It is still another object to the invention to provide a digitalcopier and method of operating a digital copier which performs at leastone of an image rotation, performing a logical function such as ANDingor ORing, and generating an image by repeatedly using all or part ofanother image.

[0011] These and other objects are accomplished by a digital copier andmethod which operates on a block basis. In order to achieve an efficienttransfer of the images, the block size is preferably the size of adirect memory access buffer, or an integral multiple or can be evenlydivided into the size of the DMA buffer.

[0012] The image manipulation performed by the invention includesrotating of the image. Such a rotation is performed by rotating thesmaller blocks of the image and then writing the blocks to anappropriate position in memory which corresponds to a rotated positionof the image. As an alternative to, or in addition to the imagerotation, it may be necessary to flip the image. This is required whenthe main-scan direction of a scanner is opposite to or 180° out of phasewith the desired main-scan direction. In this case, the image datawithin the blocks, and the blocks themselves are flipped or rotated 180°about an axis parallel to a sub-scan direction of the scanned image.

[0013] Another image processing function which may be performed by thepresent invention is logically combining two or more images. The imagesare logically combined, for example by ANDing or ORing the images. Otherlogical operations such as an exclusive OR operation may be performed,if desired.

[0014] Another type of image processing which may be performed is animage repetition function. This allows the construction of an image byrepeatedly using all or part of another image. The image repetition isalso performed utilizing smaller blocks and repeatedly generatingsmaller blocks of the original image or section which is to be repeated.The image repetition function may be utilized as a paper savingoperation and when an image is half of a normal page size or smaller,the image may be repeated two or more times on a single page, thusreducing the number of sheets of paper which are utilized. The imagegenerated using the repeated portion or the entire image may begenerated by writing a first row of blocks of the selected section intoa memory until the first end of the image to be formed is reached.Thereafter, subsequent rows of the section which have been selected arewritten into memory until the end of the image is reached. When theimage to be formed requires further rows of image data, the image isconstructed by beginning again with the first row of blocks andsubsequently using the remaining row of blocks of the selected sectionof the image to be repeated until the final image is constructed.

[0015] By performing the various image processing functions on a blockbasis, the processing speed is increased and there is no need to waitfor the entire scanning of an image or the filling of a memory with theentire image. When the image generated during the image processing is tobe printed, the blocks are generated across a row of the main-scandirection of the printer which allows the printer to begin printing assoon as the first row of image data is generated.

BRIEF DESCRIPTION OF THE DRAWINGS

[0016] A more complete appreciation of the invention and many of theattendant advantages thereof will be readily obtained as the samebecomes better understood by reference to the following detaileddescription when considered in connection with the accompanyingdrawings, wherein:

[0017]FIG. 1 illustrates a system diagram of a digital copier accordingto the invention;

[0018]FIG. 2 illustrates the user interface 30 of FIG. 1;

[0019]FIG. 3 is a block diagram of the interface 22 to the scanner andplotter illustrated in FIG. 1;

[0020]FIG. 4 is a diagram showing the data flow for image manipulation;

[0021]FIG. 5 is an alternative embodiment of the invention using aseparate bus to connect the scanner and plotter to the host bridge 14;

[0022]FIG. 6 illustrates an orientation of an image;

[0023]FIG. 7A-7D illustrates four rotations of the image of FIG. 6;

[0024]FIG. 8 illustrates an image to be rotated divided into six blocks;

[0025]FIGS. 9A-9G illustrates the process of data manipulation in orderto rotate the scanned image of FIG. 8 and specifically, FIG. 9Aillustrates a scanning of the first M lines of the image, FIG. 9Billustrates the rotation of the first block of the image, FIG. 9Cillustrates the writing of the first block into the appropriate positionin memory, FIG. 9D illustrates the rotation of a second block of theimage, FIG. 9E illustrates the writing of the second block into theappropriate position in memory, FIG. 9F illustrates the organization ofthe memory after all six blocks have been rotated, and FIG. 9Gillustrates the rotated image generated using the data as arranged inFIG. 9F;

[0026]FIG. 10A illustrates how the image of FIG. 8 is stored in memoryafter being rotated 180 degrees;

[0027]FIG. 10B illustrates the image generated using the dataarrangement of FIG. 10A;

[0028]FIG. 11 illustrates the process used to rotate images;

[0029]FIG. 12A shows the sub-scan direction being from the top of thedrawing figure to the bottom of the drawing figure, and FIG. 12Billustrates the image resulting from the scan of FIG. 12A;

[0030]FIG. 13A illustrates the sub-scan direction proceeding from thebottom of the drawing figure to the top of the drawing figure, FIG. 13Billustrates an image resulting from the scan of FIG. 13A, and FIG. 13Cillustrates the image of FIG. 13B flipped about an axis parallel to asub-scan direction;

[0031]FIGS. 14A and 14B illustrate image pixels within a block of animage which are flipped with respect to each other;

[0032]FIG. 15 illustrates a process of rotating an image immediatelybefore printing;

[0033]FIG. 16C illustrates the result of ORing of the images of FIGS.16A and 16B;

[0034]FIG. 17C illustrates the result of masking the image of FIG. 17Ausing the mask of FIG. 17E;

[0035]FIG. 17F illustrates the result of masking the image of FIG. 17Dusing the mask of FIG. 17E;

[0036]FIG. 18 is a flowchart showing the process of performing a logicaloperation on images using blocks of the images;

[0037]FIG. 19A illustrates an image, FIG. 19B illustrates the selectionof a portion of the image to be repeated, and FIG. 19C illustrates animage generated using a repeating of the section selected in the imageof FIG. 19B;

[0038]FIG. 20A illustrates an image, FIG. 20B illustrates a half of thepage of the image being selected, and FIG. 20C illustrates the resultsof the image repetition function performed based on the selection inFIG. 20B;

[0039]FIG. 21 illustrates the main-scan and sub-scan directions of ablock of an image on which an image repeating function is to beperformed;

[0040]FIG. 22A illustrates all blocks of an image used for an imagerepeating function;

[0041]FIG. 22B illustrates a selected section of the image of FIG. 22Aused for the repeating function;

[0042]FIG. 23A-23D illustrate the process of writing an image containingthe portion which is to be repeated; and

[0043]FIGS. 24A and 24B are a flowchart illustrating the process ofimage repetition.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0044] Referring now to the drawings, wherein like reference numeralsdesignate identical or corresponding parts throughout the several views,and more particularly to FIG. 1 thereof, there is illustrated the systemarchitecture for a digital copier or multi-function device of thepresent invention. A digital copier is a device which has the capabilityof scanning an image and creating a digital representation of the image,storing at least temporarily the digital representation in a memory orbuffer, and printing the digital representation of the image. A digitalcopier is a special purpose device and is preferred to have thecapability of copying at least 10 to 15 pages per minute (“ppm”),although the present invention is designed for a copy speed ofapproximately 45 ppm but the system may be as slow as 35 ppm or as fastas 55 ppm, although any desired speed including speeds higher than 55ppm and slower than 35 ppm may be accomplished by the architecture ofthis invention. In FIG. 1, there is a motherboard 10 having mountedthereon a CPU 12, and a host bridge 14 which interfaces the CPU 12 tothe system bus 44 and the memory 16. The CPU 12 may be implemented asany type of processor or microprocessor and the preferred implementationof the invention utilizes a NEC VR4300 RISC microprocessor, although anyother microprocessor may be used with this invention including laterdeveloped NEC microprocessors, microprocessors from Intel, Motorola,Hitachi, or any type of microprocessor or processor from anymanufacturer. The motherboard 10 may be implemented in any desiredmanner including using a PC compatible motherboard with a Pentiumcompatible processor (or higher), or other type of processor. While themotherboard 10 has been illustrated, the system does not require andshould not be limited to such a motherboard structure or organization.For example, if desired, all interfaces to the PCI bus may be throughPCI bus slots on the motherboard 10. Alternatively, the devices of FIG.1 may be connected without the use of a motherboard.

[0045] The host bridge 14 functions as a memory controller for a memory16, and is also the host bridge or interface between the bus 44 and theCPU 12. In the preferred embodiment of the invention, the host bridge 14is implemented as the NEC VRC4373 PCI bridge and memory controller,although the invention should not be limited to this host bridge andmemory controller. In the preferred embodiment of the invention, the DMA(direct memory access) operation is controlled by the devicetransferring data. For example, the DMA operation is preferablycontrolled by an interface 22 when transferring data from or to a scanunit 24 or a plot unit 26. In the preferred embodiment of the inventionthe DMA transfers are performed in blocks of 32 bytes. In accordancewith a 32 byte DMA transfer size, the DMA buffers may also beimplemented as 32 bytes in size. Transfers which are 32 bytes in sizeare a convenient size as smaller blocks of an image which are processedwithin the interface 22 are also preferably 32 bytes. However, the sizeof the DMA transfers may be any desired size, whether bigger or smallerthan 32 bytes. The size of the DMA transfers, and/or the buffer(s) usedfor the DMA transfers are chosen based on the system architecture.Typically, the data transferred by the DMA operation is read from abuffer at the transmitting device and written to a buffer at thereceiving device. DMA transfers may occur between any of the devicesconnected to the bus of 44 of FIG. 1. Factors which may be examined, ifdesired, in determining the size of the DMA transfers include the sizeof the data which is being accessed, the transfer burst length such asthe burst length of the bus, and the access capability. These arenon-limiting factors and any other factor may be utilized to select theDMA transfer capabilities and parameters. Transferring data in blocks of32 bytes in the system of FIG. 1 results in a very efficient transfer ofimages. Thus, a function of this invention is to transfer (and process)the images in blocks which have the same size as the buffer of the DMAcontroller. It would also be efficient, although probably not asefficient, for the block size used when processing images to be amultiple of the DMA buffer size or alternatively be evenly divisibleinto the DMA buffer size. For example, the block size may be 64 bytes oralternatively 16 bytes for a 32 byte DMA buffer. Alternatively, anyother block size or DNA transfer size may be used. The designspecifications, functions, and capabilities of the NEC VRC4373 PCIbridge and memory controller as set forth in publically availabledocuments are incorporated herein by reference.

[0046] The host bridge 14 interfaces to the bus 44 which is a standardbus and more preferably a PCI bus. A standard bus, or industry standardbus, is a bus which meets a standard. A standard is defined as indicatedin the Computer Dictionary of the Microsoft Press, 1997, which isincorporated herein by reference. A standard may be either of twodifferent types of standards. A first type of standard is a de juretechnical guideline advocated by a recognized noncommercial orgovernment organization that is used to establish uniformity in an areaof hardware or software development. The standard is the result of aformal process, based on specifications drafted by a cooperative groupor committee after an intensive study of existing methods, approaches,and technological trans and development. The proposed standard is laterratified or approved by a recognized organization and adopted over timeby consensus as products based on the standard become increasinglyprevalent in the market. The PCI bus standard is a type of de juretechnical guideline standard. Alternatively, a standard may be a defacto technical guidelines for hardware or software development thatoccurs when a product or philosophy is developed by a single company andthrough success and imitation, becomes so widely used that deviationfrom the norm causes compatibility problems or limits marketability.This type of highly informal standard setting is exemplified byHayes-Compatible modems and IBM PC-compatible computers.

[0047] In the preferred embodiment of the invention, the standard bus 44is implemented using a PCI bus standard. A PCI bus is a bus which hasbeen developed and approved by the PCI Special Interest Group (SIG).This definition includes PCI specifications which have been approved bythe PCI SIG at the time of this writing, and also PCI busses which arelater approved. Currently, the PCI Specification Revision 2.1 isapproved as is the PCI to PCI Bridge Specification Revision 1.0 areapproved by the PCI, SIG and are incorporated herein by reference.Additionally, the final draft of the PCI bus specification ver. 2.2 isin existence, may be utilized by the invention, and is incorporatedherein by reference. Still further, two new PCI bus specifications havebeen reviewed and are in the process of being approved, including thePCI-X specification and the Mini PCI specification which are bothincorporated herein by reference. Further, any bus which accepts PCIcompatible cards or interfaces may also be considered a PCI bus. In thepreferred implementation of the invention, the bus is 64 bits wide andoperates at 66 MHZ, although speeds faster and slower and widths widerand narrower may be used for the bus. In the preferred embodiment of theinvention, the PCI bus 44 is directly connected to the host bridge 14which is directly connected to the CPU 12. Thus, the bus 44 may bemounted at least partially on, or alternatively is mounted completelyon, the motherboard 10. In one embodiment of the invention, the bus 44is a PCI bus, but in other embodiments of the invention, the bus 44 maybe implemented as any other desired bus meeting the designer's or user'srequirements, and may or may not be an industry standard bus.

[0048] The memory 16 is a work area memory and/or random access memory(“RAM”) utilized for storing both computer instructions which areexecuted by the CPU, and also for storing images which are processed.The memory 16 may be any type of memory including fast page DRAMS, EDORAMs, synchronous DRAMs, and flash memory or any combination thereof.While not specifically illustrated in FIG. 1, the motherboard willusually have some type of boot memory used when booting-up, powering on,or resetting the digital copier. The boot memory utilizes some type ofnonvolatile memory such as a flash memory or flash ROM, ROM, a disk orother nonvolatile memory. The boot memory may be part of the memory 16,may be a different memory connected to the host bridge 14, may beincluded within the host bridge 14, may be connected between the CPU 12and the host bridge 14, may be connected directly to or be part of theCPU 12, or may be at any desired location. The memory 16 may beimplemented using one or more memory chips which may be semiconductormemory chips. Thus, the present invention includes storing both imagedata and computer instructions in the same memory chip. The inventionmay also be implemented such that a range of physical addresses used forstoring images is next to a range of physical addresses used for storingcomputer instructions.

[0049] A novel feature of the system architecture of FIG. 1 is the useof a unified memory 16 for storing both image data and instructions forthe CPU 12. The use of the concept of virtual memory allows the systemto efficiently use a limited amount of RAM in the memory 16 and storeboth the image data and the instructions. Data stored within the memory16 may be paged into and out of a mass storage device 20 such as a harddisk drive connected to an interface 18. The virtual memory systemdynamically allocates the memory 16, between the computer instructionsand image data, as needed. The virtual memory system is implementedutilizing the CPU and the operating system of the CPU. Thus, the CPU orthe CPU in combination with the operating system may be considered avirtual memory controller. Alternatively, the virtual memory controllermay use additional components, or may be separate from the CPU, ifdesired. In the preferred embodiment of the invention, the operatingsystem utilized is LINUX and may be implemented using, for example,version 1.3.94, although any other version of LINUX, or any otheroperating system may be used including a Windows operating system fromMicrosoft. The allocation of the memory 16 for computer instructions andimage data may change, as desired, in order to efficiently implement theinvention. For example, instructions for the CPU 12 may be paged out ofthe memory 16 so additional image data can be paged into the memory 16,and vice-versa. Further details of the implementation and use of virtualmemory, as may be used with the invention, are set forth in the booksentitled “The Indispensable Pentium Book,” by Hans-Peter Messmer,published by Addison-Wesley, 1995, at pp. 207-218, and “ComputerArchitecture and Parallel Processing” by Hwang et al, 1984, at pp.80-98, which are both incorporated herein by reference.

[0050] While the virtual memory system of this invention swaps computerinstructions (code) and image data into and out of the memory 16, it ispreferable at times, and may even be required, to keep specific code anddata in the memory 16 (e.g., lock sections of memory in the memory 16 sothat they are not subject to paging or swapping). Such code and data maybe parts of the operating system. Application code and data are normallysubject to swapping and paging in their entirety. A large part ofphysical memory (e.g., memory 16) is conceptually segmented by theoperating system into a set of frames of a predetermined size. This partof the physical memory is usually referred to as the paged memory.Applications, as well as the operating system, may be programmed in anabstract address space. The compiler and linker, together, assignvirtual addresses to the various code and data segments generated by thecompilation and linking of such programs. The addresses are assignedsuch that the program objects reside in a contiguous linear addressspace, which has a beginning and an end. This entire address space,which is exclusive to a process, is also conceptually segmented by theoperating system into a set of “pages,” which are preferably the samesize as the size of the “frame.” When required, the operating systemplaces the required “page” into a “frame” and conditions a MemoryManagement Unit (MMU) to perform address translation during a reference.This entire mechanism and operation is not visible to the applicationprogram.

[0051] The operating system reserves a certain amount of physical memoryfor its own dedicated use and places essential objects for its operationin that area of memory at boot time. This area is not subject to paging.It is usually referred to as the non-paged memory. During activation ofan application program, the operating system places a few pages of theapplication code and data in the physical memory frames, chosenarbitrarily, and sets up the MMU for address translation. This initialset is commonly referred to as the working set. Once the applicationstarts execution, it may make a reference to a virtual address for whichthe operating system may not have set up the translation in hardware.When a such a reference occurs, an exception occurs. Such exceptionevents are known as page-faults. When a page-fault occurs, the operatingsystem intervenes and services the page-fault. Such a service includesthe operations of (1) figuring out the location of the page into whichthe reference was made, (2) placing the required page from the hard diskinto an available physical memory frame, (3) installing an addresstranslation for the new page into the MMU hardware, and (4) resumingexecution of the application process.

[0052] The operating system keeps a “page-table” to help speed up thepage-fault servicing as well as to hold several associated flags that ituses to ensure proper operation and integrity of applications code anddata. For large address space machines, such as modem microprocessors, asingle page table can be very long and may tie up a large amount ofphysical memory. Hence, several page-sized page-tables may be used, sothat page-tables themselves can be paged. A hierarchy ofpage-directories is used to keep track of all the page-tables. Often,the operating system may have the need to free up physical memory pageframes. It does so by evicting a page from a chosen frame to the harddisk.

[0053] The number of pages resident in physical memory at any given timefor any given process, or even for the operating system is dynamicallycontrolled by the operating system based on the needs at that time. Ifthe system starts running of out physical memory due to any reason, itusually frees up physical memory through an operation called swapping orpaging. It may be desirable to keep certain pages from being swapped outof physical memory. For example, it is known that image data within theDMA buffers will eventually (or immediately) be needed. Thus, this imagedata can be allocated in the physical memory and never released i.e.,put it in non-paged memory. However, since application programs needaccess to this data, it must also be accessible from the virtual addressspace. Still further, more than one application may need the same dataconcurrently. One solution for this is to copy data from kernel space(non-paged memory) to user space. That is fairly inefficient so theremay be mapping of the physical DMA buffers into the requesting process'saddress space as needed, when needed. However, such mapped pages shouldnot be subject to paging.

[0054] The mass storage device 20 of FIG. 1 is preferably implementedusing a hard disk drive, although any other type of mass storage drivemay be utilized including a drive such as a magneto-optical disk drive,or other readable/writeable storage drive. The mass storage device 20 isconnected to the bus 44 utilizing the interface 18. The interface 18 maybe built into the mass storage device 20, if desired.

[0055] The interface 22 is one of the features of the invention whichallows the efficient implementation of a digital copier. The interface22 provides a single interface to the bus 44 of both the scan unit 24and the plot unit 26. In one embodiment, the plot unit 26 does not havethe ability to generate a rasterized image or process commands such asthe commands of the printer languages PCL and PostScript. Instead, theimage data is transmitted to plot unit 26 in a rasterized format.Alternatively, the plot unit 26 may be capable of generating arasterized image and may be capable of processing PCL and/or PostScriptcommands. Basic processing capabilities such as image rotation, imageoverlay, and image repetition are preferably carried out in theinterface card 22, as explained in detail below. The basic functions andmovement of the scan unit 24 and the plot unit 26 are controlled usingrespective engine controllers included therein. The location of therespective controllers may be anywhere and is preferably within thedigital copier. There is no requirement for the plot unit 26 and scanunit 24 to be in different housings, although this arrangement may beutilized. Also connected to the interface 22 is a user interface 30which allows the user to input commands to control the copying, printingand facsimile functions and also used to display information or any typeof message to the user.

[0056] The PCI bus 44 may have any conventional component connectedthereto. The advantage of utilizing a standard bus such as a PCI buswithin the digital copier is that any type of component which iscompatible with the standard bus 44 may be quite easily and usuallyinexpensively utilized in the digital copier. Examples of such readilyavailable and inexpensive cards which may plug into the PCI bus includenetwork cards and fax modem cards, although any other type of card orcomponent may be utilized. Further, in ordinary situations, the CPU 12may handle the processing which is required by the additionalperipherals or cards connected to the standard bus 44. The softwaresolution of this invention does not require the software to be highlyintegrated with the added peripheral or card but the software may besimply loaded onto the mass storage device 20 for execution by the CPU12.

[0057] In order to efficiently operate the digital copier, it isdesirable to compress the data representing images. Thus, there is adata compressor 32 which is utilized to compress and decompress theimage data. Any type of data compression including lossless or lossycompression algorithms may be utilized or a combination thereof may beutilized. Examples of image compression which may be utilized includecompression based on the Lempel-Ziv adaptive compression algorithm,compression based on the Adaptive Lossless Data Compression (“ALDC”)algorithm, or a Reed-Solomon Forward Error correction algorithm, or anyother type of data compression and decompression may be utilized.Various data compression products which may be used as the datacompressor 32 are commercially available from the company AdvancedHardware Architectures, Inc. located in Pullman, Wash.

[0058] The digital copier or multi-function device of the invention mayinclude a facsimile function. In order to implement communication withother facsimile machines, there is a fax modem 34 connected to the bus44. The fax modem communicates over a public switched telephone network(“PSTN”) 36. Alternatively, any other communication medium may be usedto communicate facsimiles including an ISDN (“Integrated SwitchedDigital Network”) or the Internet. Scanned images may be transmitted outof the digital copier and images to be printed may be received by thedigital copier through a network card 38. The network card 38 isconnected to a LAN (Local Area Network) 40, although the network cardmay also be connected to a Wide Area Network or the Internet, ifdesired.

[0059] The digital copier may include one or more other card 42connected to the bus 44. This other card 42 may be implemented as anytype of peripheral or device which plugs into the bus 44 and may beutilized to connect a second fax modem card within the digital copier,or may also be utilized to interface other storage drives such as afloppy disk drive or a CD ROM drive for loading new software into thedigital copier to upgrade, enhance, or change the functions performed bythe CPU and the digital copier. The standard bus 44 allows theinterfaces and cards plugged therein such as the peripherals 32, 34, 38and 42 to be off-the-shelf products which are readily available andinexpensive. Such readily available products, especially for a PCI bus,make the architecture of the present invention highly desirable andallow a reduced cost of the digital copier and flexibility andscalability of the system.

[0060] The digital copier of the invention may utilize an automaticdocument feeder to feed pages to be scanned over the scanning device ofthe scan unit 24. The automatic document feeder may be implemented toaccept a stack of pages face-up and then rotate the images face-down asthey are being scanned. Alternatively, the automatic document feeder mayreceive the stack of pages in a face-down orientation and then therewould be no need to rotate or invert the physical pages before scanning.Additionally, the plot engine and scan engine may be implemented in anydesired manner including by using conventional technology, if desired.Example plot and scan engines which may be utilized with the inventionare set forth in U.S. Pat. No. 5,819,110, which is incorporated hereinby reference. It is also noted that the plot engine and scan engine maybe implemented using the same or different housings.

[0061] The general system design of this invention provides theperformance of real-time responsiveness while utilizing the concept of aunified memory which is novel in a digital copier. However, the systemrequirements become more stringent as the system throughput requirementsincrease. For example, a 45 cpm copier may require a response toreal-time events much quicker than a 10 cpm copier may need. Thereal-time response provided by this invention means that the controllerhas a limited, usually very small, time to react to an event that occursin real-time during an operation. This requirement arises out of thefact that other parts of the system should not be stalled due to a lackof response.

[0062] In order to achieve the desired response time, the embodiment ofinvention having a unified memory may utilize one or more or thefollowing features, and these features may also be applicable with theother embodiments of the invention. In order to increase the speed ofthe system it is desirable to remove as much of the time-criticalrequirements from the system as possible through careful design of thesystem. Exemplary features which can be used to increase system speedinclude the following concepts: make the highly time-critical operationsbe managed by the engine (e.g., scan or plot engines) interface hardware(e.g., interface 22) near the engine and/or as close to the engine aspossible; make less time-critical operations interrupt-driven; providesufficient buffering in the engine interface hardware such that thecontroller can respond to events without causing any disruption of thedata flow; move data from the engine interface buffers to the mainmemory 16 through DMA operations, manage DMA events through interrupts,prioritize interrupts so that events requiring urgent service can beserviced in time, influence process scheduling in the operating systemthrough prioritized interrupts, make interrupt latency as small aspossible through the use of DPCs (Deferred Procedure Calls), maketime-critical execution paths through the operating system as well asthe application software as short as possible, avoid copying of data asmuch as possible, and use references through virtual memory mapping.

[0063]FIG. 2 illustrates the details of the user interface 30 of FIG. 1.The user interface includes a size indicator 50 which is a display ofhow much the image generated by the digital copier is to be enlarged.For example, no enlargement would be indicated by a size of 100%, someenlargement would be a size of 110%, and a reduction in size would be90%. An up button 52 increases the enlargement and a down button 54reduces the size. There is a clear button 56 to clear a current copyoperation, a reset button 58 to reset the parameters of the copier todefault parameters, and a copy button or key 60 which commands the startof a copy job.

[0064] The print density of the images generated by the copier ormulti-function device is controlled by a lighter button 64 and a darkerbutton 62. Each time one of these buttons or switches is pressed, anindicator light such as one of the plurality of LEDs 68 moves one spacein a direction corresponding to the key which was pressed. There is amark 66 which indicates a default position or a value of zero for thedensity. The user interface 30 further includes a display 70 which maybe implemented as a Liquid Crystal Display (“LCD”), for example, and isused for displaying any type of information of the copier such as theparameters of the copier including the number of copies to be made,copying operations, and diagnostic or error information of the copierincluding paper jams. Since the digital copier of the present inventionmay include multiple functions and may be a multi-function machine, adisplay 70 is also capable of displaying information related to theseother functions such as all information related to a facsimile send orreceive function including the telephone number to which the facsimileis to be transmitted, and the identification or telephone number whichis transmitted from the remote facsimile machine, whether the remotefacsimile machine is in a transmitting or receiving mode. Further, asthe digital copier may function as a printer or scanner, the informationassociated with the printing and scanning functions may also bedisplayed. The user interface 30 further includes a number pad and otherbutton/switch inputs 72 which includes keys to enter any of the tendigits 0-9 in order to select a number of copies, for example. Further,other buttons and switches related to other functions of the device suchas scanning and printing functions may be included on the number pad andother button/switch inputs 72.

[0065]FIG. 3 illustrates in block diagram format components within theinterface 22. The interface 22 is preferably implemented on a singlechip or ASIC, although any desired structure may be utilized toconstruct the interface 22 including a plurality of semiconductordevices and/or interconnection of conventional circuit components. Datato the interface 22 arrives from the bus 44 and is transferred to eithera DMA read buffer 80 or a Control and Status Register (CSR) buffer 82.The image data is preferably transferred to the interface 22 forprinting on the plot unit 26 or transferred from the interface 22 whenoriginating from the scan unit 24 using a DMA operation. Incoming imagedata transferred into the interface 22 is transferred in using the DMAoperation and is written to the DMA read buffer 80. Other informationsuch the control and status information used to control the operation ofthe interface 22 may arrive at the interface 22 without performing a DMAoperation and is thus written into the CSR buffer 82. From the CSRbuffer, the control and status information is written to the control andstatus registers 84. The control and status registers 84 may be utilizedto control not only the operation of the interface 22 but also theoperation of the digital copier. For example, the number of copies,print density, magnification and other information related to thecopying, scanning and/or printing operations may be stored in thecontrol and status registers 84. The data stored in the control andstatus registers 84 may originate from the CPU 12 of FIG. 1 or otherdevice on the motherboard 10. Alternatively, the data of the control andstatus registers 84 may originate from the user interface 30 afterpassing through an interface 86 which links the user interface 30 to theinterface 22. The control and status registers 84 control the generaloperation of the digital copier and various components of the interface.Therefore, the control and status registers 84 are preferably accessibleto a plot interface and processor 92 and a scan interface and processor96. Additionally, the control and status registers 84 may also beavailable to a PCI target controller 88 and a PCI master controller 90,explained below.

[0066] Incoming image data is written to the DMA read buffer 80. Thisbuffer, while serving as a temporary storage data for incoming imagedata to be printed, also may be utilized to perform logic operations.For example, the present invention may be implemented to perform anORing, an ANDing, and a masking function, which are explained below.These logical operations are preferably performed by writing a firstimage into the DMA read buffer 80, and subsequently performing thelogical operation by writing the second image over or combining thesecond image with the image which already exists in the DMA read buffer80 in order to perform the desired logical operation. The DMA readbuffer 80 is preferably the same size as a corresponding buffer of thehost bridge 14 of FIG. 1 which is 32 bytes, although any other sizebuffer or DMA transfer size may be utilized, as desired. The logicoperations performed by the DMA read buffer are performed based on thecontrol and status information stored in the control and statusregisters 84, although other types of controlling logic or functions maybe implemented in any desired manner.

[0067] The PCI target controller 88 and PCI master controller 90 aregenerally known devices and are utilized to control communication to andfrom the interface 22 over the bus 44. The PCI target controller 88 isutilized for initialization and set-up of memory transfers while the PCImaster controller 90 is utilized to control high speed and direct memoryaccess utilizing the bus 44. While not illustrated in FIG. 3 in order toreduce clutter, the control and status registers 84 are accessible tothe various devices of FIG. 3 including the PCI target controller 88,the PCI master controller 90, the plot interface and processor 92, andthe scan interface and processor 96, in addition to the interface 86.

[0068] The plot interface and processor 92 controls the data delivery tothe plot unit 26 over a port 95, although any desired connection pathmay be used including wires, a fiber optic cable, or a bus. The plotinterface 92 also controls a macrorotation of the images (a reading orwriting of blocks of image data to and from the appropriate location), amicrorotation of the individual blocks, an image repetition function,and the DMA operation. A plot data RAM 94 stores image data beforetransmission to the plot unit 26. When performing a logical operation onthe image data such as rotation of the image data is performed, a blockof the image data is read from the DMA read buffer 80 utilizing the plotinterface and processor 92 and the plot interface and processor 92controls the rotation of this block of data. The data is subsequentlywritten into the plot data RAM 94, in the rotated orientation, ifdesired. Data is transmitted to the plot unit 26 which includes anengine controller. Thus, the plot interface and processor transmits overthe port 95 to the plot unit 26 both image data and control data, andalso a clock signal for proper synchronization.

[0069] Similar to the plot operation, the scan interface and processor96 controls a DMA operation of image data obtained from the scan unit 24over a bus 97, and also controls manipulation of this image data such asrotation of the data. When the data is received from the scan unit 24,it is first written to the scan data RAM 98. When transferring this dataout of the interface 22 to the memory 16 or the mask storage device 20,for example, the image data is read from the scan data RAM in blocks,rotated and/or flipped by the scan interface and processor 96, andtransferred to a DMA write buffer 100. The outgoing image data from theDMA write buffer 100, outgoing control and status information from thecontrol and status registers 84 are transferred to a multiplexer 102which transmits data to the bus 44.

[0070] Various image manipulation functions are performed by the digitalcopier of the present invention. However, to copy images at a preferredrate of 45 ppm, it is desirable to perform the image processingfunctions as rapidly as possible and preferably, without waiting foracquisition of an entire image. Thus, it is desirable to process theimage in smaller regions or blocks. It is to be noted that theprinciples of this invention are also applicable and may be applied toboth faster and slower systems and machines. An efficient manner ofaccomplishing the desired image processing is to perform the imageprocessing as the image data is being obtained from the scanner, oralternatively, as the image data is being sent to the printer. Byperforming the image manipulation as the image is being obtained fromthe scanner or written to the printer, extra or dedicated steps ofreading the image data into and out of memory can be avoided along withextra steps which would be necessary to move the data across the bus.The transferring of image data across the system bus in a conventionalmanner for the sole purpose of the image manipulation results in a largeburden on the computing resources.

[0071]FIG. 4 illustrates the data path in the present invention used forimage manipulation. In FIG. 4, image data is obtained from the scan unit24 and written to the buffer 98. A device 96 for controlling therotating or other processing of the image data reads the image data fromthe buffer 98 and writes the processed data to the DMA buffer 100. Theprocessed data which may be rotated or flipped data, for example, istransferred to the memory 16 over the bus 44 using a DMA operation, forexample. Thus, in order to write processed data into the memory of thedigital copier, only one trip across the bus 44 is required. Similarly,when reading the data out of the memory in order to print the data, theimage data is read from the memory 16 and travels across the bus 44using a DMA operation, and is written to the DMA buffer 80. The image isprocessed as needed such as by performing a logical operation on two ormore images, and/or rotation or repeating a section of an image, asexplained below, by the device 92. From the device 92, the processeddata is written to the buffer 94 and ultimately transferred to the plotunit 26 for printing.

[0072] In contrast to the data flow illustrated in FIG. 4, conventionalsystems may transfer the unprocessed data directly to the memory of theprocessor from the scanner without being processed. Then in order toprocess the image data, the data must be read out of the memory,processed, and written back into memory. In this case, there are twoextra traverses across a bus as compared to the data flow of thisinvention.

[0073] If the invention transfers data from the scanner first to thedata compressor/decompressor 32 before being written to the memory,there will be two traverses of the image data in order to get the imagedata to the main memory. First, the image data will be transferred fromthe DMA buffer 100 to the data compressor/decompressor 32, and secondthe data will be transferred from the data compressor/decompressor 32 tothe memory 16. Similarly, in order to decompress the image data, therewill be two traverses across the bus in order to first decompress theimage data and then to get the decompressed image data from the datacompressor/decompressor to the plot unit 26. While the compressing anddecompressing results in an extra traverse of the bus 44, such an extrastep would also be required in conventional systems, if such aconventional system were to have a compression and decompression schemesimilar to that used by the invention.

[0074]FIG. 5 illustrates an alternative embodiment of the invention. Inthis embodiment, the interface 22 which is connected to the scan unit24, plot unit 26, and user interface 30 has its own dedicated bus 46which is preferably a PCI bus. A host bridge 48 provides an interface ofboth busses 44 and 46 to the CPU 12. The other functions andcapabilities provided by the host bridge 14 and FIG. 1 are also includedin the host bridge 48 of FIG. 4.

[0075] A function performed by the digital copier of the presentinvention is rotating images. For example, FIG. 6 illustrates theorientation of an original image 252. FIG. 7A illustrates this imagewith zero degrees of rotation or no rotation, FIG. 7B illustrates thisimage rotated 90 degrees in a counter-clockwise direction, FIG. 7Cillustrates an image 258 rotated 180 degrees, and FIG. 7D illustrates animage 260 rotated 270 degrees in a counter-clockwise direction. Thepresent invention works most efficiently on the four types of rotationshown in FIG. 7A-7D, although other amounts degrees of rotation may beperformed, if desired.

[0076]FIG. 8 illustrates an image 262 which is to be rotated as it isbeing scanned. The image 262 is illustrated as being divided into sixsmaller blocks. The present invention operates efficiently by working onsmaller blocks of an image. The preferred embodiment of the inventionoperates on blocks of 16 pixels by 16 pixels which occupy 32 bytes.Thus, while the example used for illustration purposes in FIG. 8 showsthe image divided into 6 blocks, for an example image which is 8½ incheswide by 11 inches wide, the image will be 319 blocks (8.5 inches×(600pixels/inch)/(1 block/16 pixels)) wide by 413 blocks in length andtherefore be made up of 131,747 blocks. These numbers are merelyexemplary and other resolutions and block sizes are possible. Whenscanning an image, the image is obtained one main-scan line at a time.Each time a main-scan line is obtained, the main-scan line drops down(or alternatively up) one pixel in the sub-scan direction. As anexemplary embodiment of how the invention may be implemented, in FIG. 8,there may be a charge coupled device (“CCD”) which extends in the longerdirection of the image 262 (horizontal with respect to the orientationof the drawing sheet) across blocks 1, 2 and 3. In FIG. 8, the block 1is illustrated as having M main-scan lines by N pixels (or N columns ofpixels). The blocks of FIG. 8 each have a number therein which iswritten sideways. These numbers are not only used to identify the blockbut are used to show the orientation of the image data within the block.The rotation of the image of FIG. 8 is performed by individuallyrotating the data of each of the blocks, referred to as a microrotation.The rotation of the image data within the block is performed as if theimage data is being rotated about a point at the center of the block.After the image data of a block is rotated, this image data is writtento an appropriate position in memory. By writing the data to anappropriate position, the location of the block is written into arotated position in memory. This type of rotation is referred to as amacrorotation. The controlling and rotation of this process may becarried out by the scan interface and processor 96 of FIG. 3. An exampleof how the rotation process is performed is illustrated in FIG. 9A-9G.

[0077] In FIG. 9A, image data 264 is obtained by scanning M main-scanlines of an image.

[0078] After the M main-scan lines are obtained, data exists for thefirst row of blocks which are illustrated as blocks 1, 2, and 3. Thefirst block 266 of FIG. 9B is obtained by constructing the block to havethe first M main-scan lines by N pixels or N columns of pixels. Afterthe block 266 is obtained, it is rotated in any desired manner to havethe orientation of the image 268 of FIG. 9B. This is the microrotationand may be about a point of block. The block may be rotated, forexample, as illustrated in U.S. Pat. No. 4,271,476, which isincorporated herein by reference. However, any other desired manner ofblock rotations may also be utilized.

[0079] After the first block of the image is rotated and the data of theimage block corresponds to the image 268 of FIG. 9B, the image blockmust be written to the appropriate place in memory. For a rotation of 90degrees in a counter-clockwise direction, the image data is written toposition 274 in a memory 270 reserved for the entire image, asillustrated in FIG. 9C. This accomplishes the macrorotation operationand functions to change the position of the block.

[0080] Next, the second block 290 illustrated in FIG. 9D is rotated 90degrees clockwise and then corresponds to the image 292 of FIG. 9D. Thissecond block is then written to memory position 278 in the memory 270,as illustrated in FIG. 9E. After all blocks are rotated and written intothe memory 270, the memory is arranged to contain the image data asillustrated in FIG. 9F. In FIG. 9F, the block with the image data fouris stored in position 272, block one is stored in position 274, blockfive is stored in position 276, block two is stored in position 278,block six is stored in position 280, and block three is stored inposition 282. In order to subsequently print the image data as stored inFIG. 9F, the image data is read out of the memory sequentially fromposition 272 to position 282 to generate the final rotated image 296 ofFIG. 9G.

[0081] If it were desired to rotate the image of FIG. 8 180 degrees, asimilar process may be performed by individually rotating the blocks 1-6of FIG. 8, 180 degrees and storing them in the order as illustrated inFIG. 10A. In FIG. 10A, the memory 302 contains blocks six, five, four,three, two, and one stored in positions 304, 306, 308, 310, 312, and 314respectively. When the image data of FIG. 10A is read out of memory forwriting and to generate an image, an image 320 may be generated which inthe first row contains the image data from blocks six, five, and, fourand in the second row contains the image data from blocks three, two,and one.

[0082]FIG. 11 is a flowchart illustrating the process for rotatingimages which operates in accordance with the examples illustrated inFIGS. 9A-9G, and 10A and 10B. After starting, step 330 scans the next Mmain-scan lines and writes the data from the scan lines into a buffer.This buffer may be the scan data RAM 98 of FIG. 3 which in the preferredembodiment is 32 KBytes although any other type of memory or size ofmemory may be utilized. The first time step 330 is performed, the firstM main-scan lines are obtained. After the M main-scan lines areobtained, enough image data has been collected so that blocks of theimage may be rotated. Step 327 reads M lines by the next N column ofpixels from the buffer in order to generate a small block for rotation.The first time step 332 is performed for a row of image data, the blockwhich is obtained has columns made of the first N pixels and subsequentblocks contain subsequent N columns of pixels. Step 334 then rotates theblock in any desired manner. Next, step 336 writes the rotated blockinto the appropriate address in memory. The appropriate address inmemory can be readily realized by knowing the orientation of the desiredfinal image. For example, in FIG. 9G, the orientation of the final imageis seen and this image is generated using the image data written intothe appropriate positions as illustrated in FIG. 9F. Similarly, FIG. 10Aillustrates the appropriate positions of the image data in order togenerate the image of FIG. 10B. It is to be noted that the images of theexamples of FIGS. 8, 9 and 10 are merely examples and should not beconsidered limiting. Any order of writing the blocks into memory and anymanner of rotating the blocks may be utilized.

[0083] Next, step 338 determines if all blocks in the buffer (the buffercontaining the M main-scan lines) have been rotated and written to theappropriate place in memory. If they have not all been rotated (orrotated and written into memory), flow proceeds back to step 332 whichreads the data for the next block for rotation. If step 338 determinesthat all blocks have been rotated, step 340 determines if the entireimage has been rotated and written to memory. If it has not, controlproceeds back to step 330 where the next M main-scan lines are scannedand subsequently written into a buffer. If the entire image isdetermined to have been scanned and rotated in step 340, the process ofFIG. 11 ends.

[0084] It is to be noted that in the process of FIG. 11 (and the otherprocesses of this invention), due to the nature of a flowchart, it isdifficult to illustrate functions occurring in parallel (e.g.,simultaneously). However, in actual operation and to have the mostefficient operation, several processes may occur simultaneously. Forexample, the scanning operation preferably does not take place in astart and stop fashion but after the M main-scan lines are obtained, therotation process of steps 327, 324, and 336 occurs while the next Mmain-scan lines are being obtained. Further, other processes of FIG. 1Imay also be performed in a parallel fashion, if desired.

[0085] A feature of this invention relates to the flipping of an imagewhich may be required when the sub-scan direction of the scanningoperation is opposite to the sub-scan direction of the printing orfacsimile transmitting operation, and/or the main-scan direction of thescanning operation is opposite to the main-scan direction of theprinting operation. FIG. 12A illustrates the sub-scan directionproceeding from the top of the drawing Figure towards the bottom of theFigure (or from right to left when viewing the image 350 in its properor upright orientation). When this information is ultimately printed, ifthe main-scan and sub-scan directions of the printer correspond to themain-scan and sub-scan directions of the scanner, the printed image 352illustrated in FIG. 12B will look the same as the scanned image of FIG.12A. However, if the sub-scan or main-scan direction of the scanner isin an opposite direction as to the sub-scan or main-scan direction ofthe printer, there will be a problem unless the image is flipped, asexplained below.

[0086] A problem of obtaining data from scanning which results in theneed to flip often results from the type of automatic document feeder(“ADF”) which is used, although it may also result from the direction ofthe main-scan direction of the CCD or other image sensor used in thescan unit 24. A common ADF reverses a face-up page in the ADF tray to beface-down on a glass or other transparent platen of the scan unit 24.Such an ADF place the sheet to be scanned in a same orientation as aperson manually making a copy. Thus, the sub-scan direction is the samewhen using the ADF as when copying sheets manually placed on the platenwithout using the ADF. This type of arrangement scans the image asillustrated in FIG. 12A and often produces an image such as in FIG. 12Band thus, there may not be a need to flip the image.

[0087] However, other types of document feeders may be utilized such asa “sheet through type” feeder which results in a need to flip the image.This type of feeder is commonly found in facsimile machines and somemulti-function machines and digital copiers. This type of feeder, whenused in a facsimile machine, permits a reduced amount of memory in thefax machine (or multifunction machine) as the data may be compressed andsent as the page is being scanned, making it unnecessary in some cases,to store the entire page of data being sent by facsimile, although thedata may be stored before transmittal, if desired. When this type ofdocument feeder is used, the scanner assembly is usually fixed inposition but the document moves. Typically, this will cause the sub-scandirection to be opposite as compared to a standard copy operation, butthe main-scan direction will stay the same or be in a normal direction.The main-scan direction of the scanner is usually fixed and depends onhow the CCD is positioned (e.g., from left to right or from right toleft, or alternative from top to bottom or from bottom to top), duringassembly of the scan unit 24. During a standard copy operation usingthis type of ADF, the first part of the image is usually the last partto be scanned (see e.g., the letter “A”s in FIG. 12A). However, whenusing the ADF, the first part of the document is the first to be scanned(see e.g., the “A”s in FIG. 13A).

[0088]FIG. 13A illustrates the sub-scan direction of an image 354 beingfrom the bottom of the image to the top of the image, when viewed in thenormal orientation of the drawing sheet, which is an opposite directionto the sub-scan direction of FIG. 12A. The image obtained from the scanof FIG. 13A is illustrated in FIG. 13B. This image is reversed or amirror image of the scanned image. In order to correct this image forproper printing, the image is flipped about an axis, preferably in amiddle portion of the image, although it can be located anywhere, whichis parallel to a sub-scan direction. The resulting image, when flippedabout an axis parallel to the sub-scan direction is illustrated in FIG.13C. While the image of FIG. 13C appears as if it is rotated 180 degreesabout a point in the image of FIG. 13A, the flipped image may have anydesired orientation, depending on how the image is flipped and thearrangement of the scanner and the ADF.

[0089] As with the image rotation explained above, flipping process isdone on a block basis and may be performed at the same time as the imagerotation. Further, the flipping process may be considered a type ofrotation but instead of flipping the images within the blocks about apoint, the image data is flipped or rotated about an axis which isparallel to the sub-scan direction. In addition to flipping the imagedata within the blocks, the position of the blocks are also flipped orrotated about an axis parallel to an axis which extends in the sub-scandirection.

[0090] Assume now that FIG. 14A illustrates 9 pixels of a block of imagedata which has been obtained from a scanning operation, such as theblock 1 illustrated in FIG. 9B. In order to print this small block,there is a requirement to flip the pixels of the block of FIG. 14A tothe position of 14B. However, not only must the pixels of the blocks beflipped, the position of the blocks must also be flipped.

[0091] Assume now that FIG. 14A no longer represent the pixels butrepresent the blocks (blocks of pixels) of the image, the position ofblocks 3 and 1 illustrated in FIG. 14A need to be flipped to obtain theblock positions illustrated in FIG. 14B (in addition to flipping thepixels within each of the blocks). Thus, blocks 3 and 1 in FIG. 14Awould be flipped to get the resulting blocks as illustrated in FIG. 14Band these blocks would be stored in memory before printing. Similarly,the positions of blocks 6 and 4 would be flipped, as would the positionsof blocks 9 and 7.

[0092] The process for flipping the blocks may be carried out utilizingthe process illustrated in FIG. 11. However, the process of FIG. 11would be modified by changing step 334 to recite rotate and flip the Mlines by N pixels block (in order to perform rotation about a point andthe flipping about the sub-scan axis). When performing step 336 ofwriting the rotated block into the appropriate address in memory, thisstep would also take into account the required flipping of the positionsof the block. However, the flipping may be accomplished with or withoutthe rotation about a point operation.

[0093] Another feature of this invention is the rotation of imagesbetween the time they are read out of the memory 16 or 20 and the timethey are printed by the plot unit 26. The process of FIG. 15 which showsthe rotation of images before plotting is similar in operation to theflow chart of FIG. 11 which rotates the image between the time the imageis scanned and when it is written to the memory. The rotating andcontrolling of rotating of this process is carried out by the plotinterface and processor 92 of FIG. 3. Thus, the rotating and flippingoperations performed on the scan data may be simultaneously performedwith the rotating (and flipping if desired) performed on the data aboutto be plotted or printed. After starting in FIG. 15, step 370 reads thenext appropriate block from memory. For example, if the image 296 ofFIG. 9G were stored in memory as illustrated in FIG. 9F and it wasdesired to print an image from this data as illustrated in the image 262of FIG. 8, the first block to be read from FIG. 9F would be block 274containing the image data for the first block, the block is written tothe DMA read buffer 80, and this image data is rotated from theorientation of the image 268 of FIG. 9B to the image 266 of FIG. 9B. Theimage data of the block 266 would then be written into a buffer such asthe buffer 94 of FIG. 3 so that the first M scan lines include thereinthe first N columns of pixels with the data of the image 266 of FIG. 9B.Next, the image data for block two stored in memory section 278 of thememory 270 would be read out and rotated from the orientation 292 ofFIG. 9D to the orientation 290 and subsequently written into the bufferin the next N columns of the M scan lines. Finally, the data of blockthree of memory location 282 will be read from the memory 270 FIG. 9F,rotated, and written to the memory buffer to form M main-scan lines asillustrated in FIG. 9A. These M scan lines would then be printed.

[0094] Referring back to FIG. 15, after rotating the block in step 372and storing the block in the temporary storage buffer in step 374, step376 would determine if there are M complete lines in the buffer, such asRAM 94 (as illustrated in FIG. 9A). If there were not, the nextappropriate block would be read out in step 370. If step 376 determinedthat the M complete lines were read, control would proceed to step 380which would determine if there are more blocks in the memory to beprinted as part of the image. If there were, the next appropriate blockwould be read, rotated and stored in the buffer as explained above. Inthe example of the data as stored in FIG. 9F, the next block which wouldbe read out of memory and rotated would be blocks 272, 276, and 280,respectively. When step 380 determines that there are no more blocks inmemory to be printed as part of the printed image, the process of FIG.15 ends.

[0095] Other functions which may be performed by this invention whichoperate on a block basis relate to the performing of logical operationsusing two or more images. FIGS. 16A, 16B and 16C are set forth in orderto illustrate the concept of ORing two images. The ORing function simplycombines or lays on top of each other the image data from two separateimages. Thus, when ORing the image 390 of FIG. 16A with the image 392 ofFIG. 16B, the resulting image 394 is as illustrated in FIG. 16C.

[0096] When ANDing two images, the resulting image only contains a blackpixel where the corresponding pixels in the two original images are bothblack. For example, the image 396 of FIG. 17A, when ANDed with the image398 of FIG. 17B results in the image 400 of FIG. 17C. The entirely blackupper region of the image 398 of FIG. 17B results in any pixel which isblack in the upper half of the image 396 of FIG. 17A being included inthe resulting image 400 of FIG. 17C while the lower half of Figure 396of FIG. 17A is effectively masked out because all pixels on the lowerhalf of the image 398 of FIG. 17B are white. Thus, the ANDing operationmay also be referred to as a masking operation. A true ANDing functionas illustrated in FIGS. 17A, 17B, and 17C may be counter-intuitive incertain situations where there is a desire to mask out a portion of animage. For example, people ordinarily think of the color black ascovering up an image whereas the example of FIGS. 17A, 17B, and 17C showthe opposite effect where the color black actually causes the letters tobe printed. Thus, it may be desirable to make the ANDing functionproduce a result which is opposite to the result of FIG. 17C and utilizeblack pixels of one image to mask the pixels of another image when thecombination image is generated. For example, the black pixel section ofFIG. 17E is used to mask the lower region of FIG. 17D in order togenerate the image of FIG. 17F.

[0097]FIG. 18 is a flowchart illustrating the process of combining theimages. After starting, step 410 reads the next appropriate block of afirst image and writes this block into the holding buffer, for examplethe DMA read buffer 80 of FIG. 3. Step 412 then reads the nextappropriate block of the second image and writes over the first image inthe buffer while performing the desired logical function. Thus, the DMAread buffer may be implemented to perform the logical operations and maydo so based on the control and status registers 84 and/or instructionsfrom the plot interface and processor 92. The block from the first imageand the block from the second image correspond in position to eachother. The holding buffer is preferably constructed so that the desiredlogic function is performed upon the writing of the second image. Forexample, when performing an OR function, black pixels of the secondimage are written to the appropriate position in the holding bufferwhile white pixels do not change the status of the black pixels of thefirst image which already exist from the first image in the holdingbuffer. Similarly, when performing the ANDing or masking function, thebuffer is constructed to automatically perform the function of ANDing ormasking the block of the first image with the corresponding block of thesecond image.

[0098] Step 414 then rotates the block of combined image data ifnecessary and step 416 stores the block in a buffer which is to beprinted. If step 418 determines that M complete main scan lines arestored in buffer, step 420 then prints the M main-scan lines. If step418 determines that there are not M complete lines in the buffer, thelogical operation must be performed on additional blocks and controlproceeds back to step 410. After the M lines are printed in step 420,step 422 is performed which determines if more blocks in the memory areto be printed as part of the printed image. If there are more blocks tobe printed, flow proceeds back to step 410 to read the next block of thefirst image and to repeat the process for the additional blocks. If step422 determines that there are no more blocks to be printed, the processof FIG. 18 ends. While the process of FIG. 18 is illustrated withrespect to printing, as an alternative to printing the logicallycombined images, the images may be stored for later use or displaywithout being immediately printed.

[0099] Another process performed by the present invention is referred toas image repetition or plot image repetition. In this section, a userselects a region of an image (or an entire image) and this region (orimage) is repeatedly generated in order to form a new image. As anexample, in FIG. 19A there is illustrated an image 430. A user selectsthe section with the words “Pick Now” as indicated by the dashed line ofthe image 432 of FIG. 19B. Then, the process of the invention repeatsthe selected section of the image and forms an image using this repeatedsection such as the image 434 illustrated in FIG. 19C. A benefit of thisinvention is that it may be useful to generate repeated copies of halfpage, third page, or quarter of a page (and also other fractions)images, for example. As a specific example, FIG. 20A contains an image436 which only occupies half of a page. In FIG. 20B, the dashed lineillustrates an image 438 which has this half page image selected. Theresult of the image repetition process is an image 440 illustrated inFIG. 20C which has the half page image printed at the top half of theimage and also at the bottom half of the image. This results in asavings of paper as the final printed image may be cut in half,resulting in a 50% savings in paper usage.

[0100] In order to provide a more detailed example of the operation ofthis embodiment, the image is broken into smaller blocks such as theblock 442 illustrated in FIG. 21. In this embodiment, for purposes ofconvenience, the main-scan direction is illustrated to be in thehorizontal direction and the sub-scan direction is illustrated to be inthe vertical direction of the paper, although these directions may bereversed, if desired. Further, FIG. 21 contains N main-scan lines by Mcolumns of pixels.

[0101] For the image repetition function, the image, as with the otherembodiments of this invention, is broken into smaller blocks. FIG. 22Aillustrates an image 450 broken into 64 smaller blocks, although anynumber of blocks may be utilized, as desired. In the preferredembodiment of the invention, the blocks contain 16 pixels per column and16 main-scan lines. In FIG. 22B, image 452 illustrates that the blocks20, 21, 22, 28, 29, 30, 36, 37, and 38 have been selected. In thepreferred embodiment of the invention, the selection is of a wholenumber of blocks (e.g. no block can be divided into a smaller portion).This does not present a problem and does not limit the selection of theuser when the digital copier has a resolution of 600 dpi (dots per inch)and each block is of a 16 pixel by 16 pixel size as these parametersyield an effective selection resolution of 0.03 inches (16 pixels/600pixels per inch). An additional reason why this whole block limitationdoes not present a problem is typically, the resolution of a displaywill typically be less than 0.03 inches, and the display may impose moreof a restriction on the selection process than the selection of wholeblocks. However, if desired, the user may select the image withoututilizing the boundary of the selected image falling on a whole numberof blocks.

[0102] After the desired region is selected by the user in FIG. 22B (oralternatively is automatically selected by the machine such as forconvenient locations or sizes which are to be repeated such as the halfpage, quarter page, and third page size, etc., the new image which isgenerated using the image repetition process begins to be formed. InFIG. 23A, the first row of selected blocks is written to an image 454.After the last block of the top row of the selected portion of the imageis reached, the first block of the first row followed by the secondblock, etc. are written in the first row of blocks of the constructedimage, as illustrated in FIG. 23B.

[0103] Next, the second row of blocks of images are repeatedly writtento an image 458 as illustrated in FIG. 23C. In FIG. 23D, the processcontinues and the third row of blocks of the image are repeatedly drawn.Once the third row has been completely written, as the third is the lastrow of the selected section of the image, the blocks start to be writtenstarting from the first row of the selected image and the final image tobe printed is completely constructed, as illustrated in FIG. 23D.

[0104]FIGS. 24A and 24B are a flowchart illustrating the imagerepetition process. After starting, step 470 selects the image sectionto be repeated. This selection may be preferably performed by a user butalternatively, single or multiple switches or buttons on the userinterface 30 may allow the user to select a half page, quarter page,third page or any other predefined repetition section. Preferably, thesection to be repeated consists of only whole blocks. However, ifdesired, the user may be allowed to select other than whole blocks ofthe image. Next, step 472 begins with the first row of blocks of theimage section which is to be repeated and the first M by N block of therow is read from the selected section and written into the buffer. Step476 determines if the end of the buffer is filled in the main-scandirection. If this is just the first block, then the buffer is not fulland flow proceeds to step 478 which reads the next M by N block in therow (e.g. the main-scan direction) and writes this information into abuffer. After the entire row of the buffer is full (see for example FIG.23B), flow proceeds to step 480 which prints the M main-scan lines whichare stored in the buffer. Again, it is noted that for this particularfunction and example, the main-scan and sub-scan directions are reversedas compared to the other examples, and also the variables M and N havebeen reversed, although any main-scan and sub-scan directions may beutilized. From step 480, flow proceeds to process A illustrated in 24B.

[0105] In FIG. 24B, step 482 determines if the printed image iscompleted in the sub-scan direction. This step determines if the entireimage has been printed. If it has, the process of FIGS. 24A and 24Bends. If the entire image has not been printed, flow proceeds to step484 which determines if there is another row of blocks of the selectedimage section to be printed. If there is not another row of the selectedimage to be printed but the last row of the selected image section wasjust printed, flow proceeds to process B which is step 472 of FIG. 24Awhere the first row of the image section begins to be written again intothe buffer. Alternatively, if there is another row of blocks theselected image to be printed, step 486 is performed which advances tothe next row of the selected image section. The flow then proceeds toprocess C which is step 474 of FIG. 24A where the first block of thisnext row is read and the process of FIG. 24A continues.

[0106] This invention may be conveniently implemented using aconventional general purpose digital computer or microprocessorprogrammed according to the teachings of the present specification, aswill be apparent to those skilled in the computer art. Appropriatesoftware coding can readily be prepared by skilled programmers based onthe teachings of the present disclosure, as will be apparent to thoseskilled in the software art. The invention may also be implemented bythe preparation of application specific integrated circuits or byinterconnecting an appropriate network of conventional componentcircuits, as will be readily apparent to those skilled in the art.

[0107] The present invention includes a computer program product whichis a storage medium including instructions which can be used to programa computer to perform a process of the invention. The storage medium caninclude, but is not limited to, any type of disk including floppy disks,optical discs, CD-ROMs, and magneto-optical disks, ROMs, RAMs. EPROMs,EEPROMs, magnetic or optical cards, or any type of media suitable forstoring electronic instructions.

[0108] Obviously, numerous modifications and variations of the presentinvention are possible in light of the above teachings. It is thereforeto be understood that within the scope of the appended claims, theinvention may be practiced otherwise than as specifically describedherein.

1. A method of manipulating an image, comprising the steps of: scanningan image line-by-line to obtain scan data; writing the scan data into abuffer; after the buffer has M lines of scan data which extend to an endof the image, performing the steps of: rotating image data of a block ofM lines by N pixels of the scan data and writing the block which hasbeen rotated to a memory; and rotating image data of other blocks of thescan data in the buffer having M lines of the scan data and writing theother blocks which have been rotated into memory.
 2. A method accordingto claim 1, wherein: the step of writing is performed withoutcompressing or decompressing the scan data.
 3. A method according toclaim 1, wherein: the steps of rotating comprising rotating the imageone of 90 degrees, 180 degrees, and 270 degrees.
 4. A method accordingto claim 3, wherein the steps of rotating further comprise: flipping thedata about an axis parallel to a sub-scan direction.
 5. A methodaccording to claim 1, wherein the steps of rotating comprise: flippingthe data about an axis parallel to a sub-scan direction.
 6. A methodaccording to claim 5, wherein the steps of rotating comprise: flippingthe data about an axis parallel to a sub-scan direction withoutperforming any rotation about an axis in a main-scan direction andwithout rotating about a point of the blocks.
 7. A method according toclaim 5, wherein the writing steps comprise: writing the blocks of scandata which have been rotated such that the blocks of scan data whichhave been rotated are written into a flipped position in memory.
 8. Amethod according to claim 1, wherein the writing steps comprise: writingthe blocks of scan data which have been rotated such that locations ofthe blocks of scan data which have been rotated are written into arotated position in memory.
 9. A method according to claim 1, furthercomprising the step of: compressing the blocks of scan data after imagedata of the blocks has been rotated and before the writing of the blocksinto a rotated position in memory.
 10. A method according to claim 1,wherein the step of rotating the M by N block comprises: rotating the Mby N block which has a same size as a direct memory access buffer usedto write the rotated block into the memory.
 11. A method of manipulatingan image, comprising the steps of: reading blocks of image data,representing an image, out of memory; rotating the blocks of image dataso that image data within the blocks is rotated; writing into a printbuffer the blocks of image data such that a location of the blocks isrotated with respect to the orientation of the image stored in memory;and printing the blocks of image data which are stored in the printerbuffer, after the buffer has M complete main-scan lines of image data.12. A method according to claim 11, wherein the step of readingcomprises: reading the blocks of image data which are a size equal to asize of a direct memory access buffer used to read the image data.
 13. Amethod of combining images, comprising the steps of: reading blocks ofimage data of a first image; reading corresponding blocks of image dataof a second image; logically combining the corresponding blocks of imagedata of the first and second images; writing into a print buffer thelogically combined blocks of image data; printing the blocks of imagedata which are stored in the printer buffer, after the buffer has Mcomplete main-scan lines of image data.
 14. A method according to claim13, further comprising the step of: rotating the logically combinedblocks, before writing the logically combined blocks into the printbuffer, wherein the writing step comprises: writing into the printbuffer the blocks of image data which have been rotated and logicallycombined such that a location of the blocks is rotated with respect tothe orientation of the blocks before the blocks are read.
 15. A methodof forming an image having a first end and a second end which isperpendicular to the first end, comprising the steps of: selecting asection of an image; dividing the section which has been selected intorows and columns of blocks; writing a first row of blocks of the sectionwhich has been selected into a memory until the first end of the imageto be formed is reached; writing in sequence subsequent rows of thesection which has been selected into the memory until the first end ofthe image to be formed is reached for the subsequent rows, and when theimage to be formed is not completed to the second end but a last row ofthe section which has been selected is reached, writing in sequence therows of the section which has been selected beginning again with thefirst row of blocks, until the image to be formed is completed to thesecond end.
 16. A method according to claim 15, wherein: the writingsteps write said rows such that each of said rows contains more than onecopy of at least one block of a corresponding row of the selectedsection of the image.
 17. A method according to claim 15, wherein: thewriting steps write said rows such that ends of said rows have blocksother than ends of the section of the image which has been selected. 18.A system for manipulating an image, comprising: means for scanning animage line-by-line to obtain scan data; means for writing the scan datainto a buffer; means for rotating image data of a block of M lines by Npixels of the scan data and writing the block which has been rotated toa memory, after the buffer has M lines of scan data which extend to anend of the image; and means for rotating image data of other blocks ofthe scan data in the buffer having M lines of the scan data and writingthe other blocks which have been rotated into memory.
 19. A systemaccording to claim 18, wherein: the means for writing operates withoutcompressing or decompressing the scan data.
 20. A system according toclaim 18, wherein both of the means for rotating comprise: means forrotating the image one of 90 degrees, 180 degrees, and 270 degrees. 21.A system according to claim 20, wherein both of the means for rotatingfurther comprise: means for flipping the data about an axis parallel toa sub-scan direction.
 22. A system according to claim 18 wherein both ofthe means for rotating comprise: means for flipping the data about anaxis parallel to a sub-scan direction.
 23. A system according to claim22, wherein both of the means for rotating comprise: means for flippingthe data about an axis parallel to a sub-scan direction withoutperforming any rotation about an axis in a main-scan direction andwithout rotating about a point of the blocks.
 24. A system according toclaim 22, wherein the means which perform the writing comprise: meansfor writing the blocks of scan data which have been rotated such thatthe blocks of scan data which have been rotated are written into aflipped position in memory.
 25. A system according to claim 18, whereinthe means for writing comprise: means for writing the blocks of scandata which have been rotated such that locations of the blocks of scandata which have been rotated are written into a rotated position inmemory.
 26. A system according to claim 18, further comprising: meansfor compressing the blocks of scan data after image data of the blockshas been rotated and before the writing of the blocks into a rotatedposition in memory.
 27. A system according to claim 18, wherein themeans for rotating the M by N block comprises: means for rotating the Mby N block which has a same size as a direct memory access buffer usedto write the rotated block into the memory.
 28. A system formanipulating an image, comprising: means for reading blocks of imagedata, representing an image, out of memory; means for rotating theblocks of image data so that image data within the blocks is rotated;means for writing into a print buffer the blocks of image data such thata location of the blocks is rotated with respect to the orientation ofthe image stored in memory; and means for printing the blocks of imagedata which are stored in the printer buffer, after the buffer has Mcomplete main-scan lines of image data.
 29. A system according to claim28, wherein the means for reading comprises: means for reading theblocks of image data which are a size equal to a size of a direct memoryaccess buffer used to read the image data.
 30. A system for combiningimages, comprising: means for reading blocks of image data of a firstimage; means for reading corresponding blocks of image data of a secondimage; means for logically combining the corresponding blocks of imagedata of the first and second images; means for writing into a printbuffer the logically combined blocks of image data; means for printingthe blocks of image data which are stored in the printer buffer, afterthe buffer has M complete main-scan lines of image data.
 31. A systemaccording to claim 30, further comprising: means for rotating thelogically combined blocks, before writing the logically combined blocksinto the print buffer, wherein the means for writing comprises: meansfor writing into the print buffer the blocks of image data which havebeen rotated and logically combined such that a location of the blocksis rotated with respect to the orientation of the blocks before theblocks are read.
 32. A system for forming an image having a first endand a second end which is perpendicular to the first end, comprising:means for selecting a section of an image; means for dividing thesection which has been selected into rows and columns of blocks; meansfor writing a first row of blocks of the section which has been selectedinto a memory until the first end of the image to be formed is reached;means for writing in sequence subsequent rows of the section which hasbeen selected into the memory until the first end of the image to beformed is reached for the subsequent rows, and when the image to beformed is not completed to the second end but a last row of the sectionwhich has been selected is reached, writing in sequence the rows of thesection which has been selected beginning again with the first row ofblocks, until the image to be formed is completed to the second end. 33.A system according to claim 32, wherein: each of the means for writingcomprises means for writing said rows such that each of said rowscontains more than one copy of at least one block of a corresponding rowof the selected section of the image.
 34. A system according to claim32, wherein: each of the means for writing comprises means for writingsaid rows such that ends of said rows have blocks other than ends of thesection of the image which has been selected.